projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc96026
)
[XEND] Update vcpu_avail when parsing configuration.
author
Alastair Tse
<atse@xensource.com>
Thu, 7 Dec 2006 11:12:05 +0000
(11:12 +0000)
committer
Alastair Tse
<atse@xensource.com>
Thu, 7 Dec 2006 11:12:05 +0000
(11:12 +0000)
Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xend/XendConfig.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xend/XendConfig.py
b/tools/python/xen/xend/XendConfig.py
index 5a06f77efb97af80ddfae0fbce9613903d6f4afd..7f0da376538a3cedcbab35088d1058cbaff8d784 100644
(file)
--- a/
tools/python/xen/xend/XendConfig.py
+++ b/
tools/python/xen/xend/XendConfig.py
@@
-353,10
+353,15
@@
class XendConfig(dict):
if self['builder'] not in ('hvm', 'linux'):
raise XendConfigError('Invalid builder configuration')
+ def _vcpus_sanity_check(self):
+ if self.get('vcpus_number') != None:
+ self['vcpu_avail'] = (1 << self['vcpus_number']) - 1
+
def validate(self):
self._memory_sanity_check()
self._actions_sanity_check()
self._builder_sanity_check()
+ self._vcpus_sanity_check()
def _dominfo_to_xapi(self, dominfo):
self['domid'] = dominfo['domid']